package com.example.springboot.service.serviceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.springboot.dao.EmpMapper;
import com.example.springboot.entity.Emp;
import com.example.springboot.service.IEmpService;
import com.example.springboot.vo.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class EmpService implements IEmpService {
   @Resource
    private EmpMapper mapper;

    @Override
    public Result getall(Page page, Emp emp) {
        return new Result(mapper.getall(page,emp));
    }

    @Override
    public int delId(Integer id) {
        return mapper.deleteById(id);

    }
}
